/**
 * 
 */
package agents.persons.dependent;

import jade.core.Agent;
import jade.core.behaviours.FSMBehaviour;

/**
 * @author Elena
 *
 */
public class DependentFSMBehaviour extends FSMBehaviour{
	
    // FSM states 
    private static final String SLG_STATE = "SLG"; //Buscar Lideres y grupos
    private static final String JG_STATE = "JG"; //Unirse a Grupo
    private static final String SSF_STATE = "SSP";//Permanecer en Lugar Seguro 
    private static final String ERROR_STATE = "error"; 

    // behaviour return values (from each onEnd() method 
    private final int FINDED = 0; 
    private final int ARRIVED = 5; 
    private final int PLS = 10; 
    private final int ERROR = -1; 

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	public DependentFSMBehaviour(Agent a){
		super(a);
		// register state behaviours 
		//registerFirstState(new SearchLeadersBehaviour(a), this.SLG_STATE);
		//registerState(new JoinGroupBehaviour(a), this.JG_STATE);
		//registerLastState(new StaySafePlaceBehaviour(a), this.SSF_STATE);
		
		// transitions of the FSM
		registerTransition(SLG_STATE, JG_STATE, FINDED);
		registerTransition(JG_STATE,SSF_STATE,ARRIVED);
		
		scheduleFirst(); 
	}
	
	public int onEnd(){
		return 0;
	}



}
